package fp.poczadly.client;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import fp.poczadly.shared.Message;
import fp.poczadly.shared.User;
import fp.poczadly.shared.Utils;

@RemoteServiceRelativePath( Utils.LIVE_CHAT_SERVICE )
public interface LiveChatService extends RemoteService {

	public User checkSession( String param ) throws NullPointerException;
	
	public User addUser( User user ) throws Exception;
	
	public User removeUser( User user );
	
	public User getSelectedUser( String username ) throws NullPointerException;
	
	public List<String> getAllUsers();
	
	public List<Message> receiveMessages();
	
	public List<Message> receivePrivateMessages( User user );
	
	public void sendMessage( Message message );
	
	public void removePrivateMessages( User from );
}
